package com.sky.service;

import com.sky.dto.EmployeeDTO;
import com.sky.dto.EmployeeLoginDTO;
import com.sky.dto.EmployeePageQueryDTO;
import com.sky.entity.Employee;
import com.sky.result.Result;
import org.springframework.web.bind.annotation.*;

public interface EmployeeService {


    /**
     * 员工登录
     * @param employeeLoginDTO
     * @return
     */
    Employee login(EmployeeLoginDTO employeeLoginDTO);

    /**
     * 新增员工
     * @param dto
     * @return
     */
    public Result addEmp(@RequestBody EmployeeDTO dto);

    /**
     * 分页查询
     * @param dto
     * @return
     */
    public Result page(EmployeePageQueryDTO dto);

    /**
     * 禁用/启用员工状态
     * @param status
     * @param id
     * @return
     */
    public Result updateEmpStatus(@PathVariable Integer status, Long id);

    /**
     * 数据回显
     * @param id
     * @return
     */
    public Result getEmpById(@PathVariable Long id);

    /**
     * 修改数据
     * @param employee
     * @return
     */
    public Result updateEmp(@RequestBody Employee employee);
}
